package com.kling.http;

import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@Data
public class KLingResponse<T> {

    @com.alibaba.fastjson2.annotation.JSONField(name = "code")
    private Integer code;
    @com.alibaba.fastjson2.annotation.JSONField(name = "message")
    private String message;
    @com.alibaba.fastjson2.annotation.JSONField(name = "request_id")
    private String requestId;

    @com.alibaba.fastjson2.annotation.JSONField(name = "data")
    private T data;

    public boolean isSuccess() {
        return code == 0;
    }
}
